package com.bridge.dict;

import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;

public class DictAnnotationIntrospect extends JacksonAnnotationIntrospector {

    @Override
    public Object findSerializer(Annotated annotated){
        Dict annotation = annotated.getAnnotation(Dict.class);
        if(annotation != null){
            return DictSerializer.class;
        }
        return super.findSerializer(annotated);
    }
}
